<?php if (isset($commentList) && count($commentList) > 0) { ?>
    <ul class="am-list" style="line-height:1.3; margin-top: 10px">
        <?php
        foreach ($commentList as $comment) {
            //如果点过赞 则使用实心的赞图标 如果没有使用镂空的
            $isCommentUp = $commentParentObj->comment_up_check($comment->Id);
            if ($isCommentUp === true) $recommendIconEx = ''; else $recommendIconEx = 'o-';
            ?>
            <li>
                <div class="web-avatar-bar">
                    <div class="web-avatar-bar-img" style="padding-top:4px;vertical-align:top">
                        <img class="am-circle web-avatar-sm" alt="" src="<?= $comment->Avatar ?>"/>
                    </div>
                    <div class="web-avatar-bar-name" style="padding-left:0;vertical-align:top">
                        <div>
                            <span class="web-main-color"
                                  id="comment_<?= $comment->Id ?>_user_name"><?= $comment->UserName; ?></span>
                            <span class="web-gray-color">&nbsp;&bull;&nbsp;<?= $comment->CommentDt2; ?></span>
                        </div>
                        <div class="web-comment-text">
                            <?php echo $comment->Text; ?>
                        </div>
                    </div>
                    <a data-comment-id=<?= $comment->Id ?> onclick="comment_reply(this)" class="am-fr web-main-color">&nbsp;&nbsp;&nbsp;&nbsp;回复</a>
                    <a data-comment-id=<?= $comment->Id ?> onclick="comment_up(this)">
                        <i id="comment_<?php echo $comment->Id ?>_up_icon"
                           class="am-fr web-main-color am-icon am-icon-fw am-icon-thumbs-<?= $recommendIconEx ?>up"></i>
                        <span class="am-fr web-main-color"
                              id="comment_<?= $comment->Id ?>_up_count"><?= $comment->UpCount; ?></span>
                    </a>
                    <?php if (isset($_SESSION['user_id']) &&
                        ($_SESSION['user_level'] >= 90 || //管理员可删除
                            $_SESSION['user_id'] == $commentParentMsg->Author || //作者可删除
                            $_SESSION['user_id'] == $comment->UserId)
                    ) { //评论者自己可删除 ?>
                        <span class="am-fr">&nbsp;&nbsp;&nbsp;&nbsp;</span>
                        <a data-comment-id=<?= $comment->Id ?> onclick="comment_dele(this)"
                           class="am-fr web-gray-color">删除</a>
                    <?php } ?>
                </div>
            </li>
        <?php } //foreach ($commentList as $comment)的结束 ?>
    </ul>
    <?php
    if (isset($paginateMsg)) //插入分页信息
    {
        echo $paginateMsg;
    }
} //if(isset($commentList))的结束
?>